import request from "@/utils/request";

// 获取考试管理列表
export function getList(data) {
  return request({
    url: "/api/exam/TemsExam/getList",
    method: "post",
    data,
  });
}
// 获取考试统计列表
export function getReportList(data) {
  return request({
    url: "/api/exam/TemsExam/getReportList",
    method: "post",
    data,
  });
}
// 获取考试批阅列表
export function getReviewList(data) {
  return request({
    url: "/api/exam/TemsExam/getReviewList",
    method: "post",
    data,
  });
}
// 获取考试管理
export function getInfo(id) {
  return request({
    url: `/api/exam/TemsExam/${id}`,
    method: "get",
  });
}
// 获取考试管理详情
export function getDetail(id) {
  return request({
    url: `/api/exam/TemsExam/detail/${id}`,
    method: "get",
  });
}
// 获取考试管理详情
export function getDataDetail(id) {
  return request({
    url: `/api/exam/TemsExam/data/${id}`,
    method: "get",
  });
}
// 删除考试管理
export function Delete(id) {
  return request({
    url: `/api/exam/TemsExam/${id}`,
    method: "DELETE",
  });
}
// 批量删除考试管理
export function batchDelete(ids) {
  return request({
    url: `/api/exam/TemsExam/batchRemove/${ids}`,
    method: "DELETE",
  });
}
// 修改考试管理
export function Update(data) {
  return request({
    url: `/api/exam/TemsExam/${data.id}`,
    method: "PUT",
    data,
  });
}
// 新建考试管理
export function Create(data) {
  return request({
    url: "/api/exam/TemsExam",
    method: "post",
    data,
  });
}

// 复制
export function Copy(id) {
  return request({
    url: `/api/exam/TemsExam/${id}/Actions/Copy`,
    method: "POST",
  });
}

// 新建补考管理
export function createMakeupExam(data) {
  return request({
    url: "/api/exam/TemsExam/createMakeupExam",
    method: "post",
    data,
  });
}

// 修改补考管理
export function updateMakeupExam(data) {
  return request({
    url: `/api/exam/TemsExam/updateMakeupExam/${data.id}`,
    method: "PUT",
    data,
  });
}
